<?php
/**
 * Jishupu-Laravel-Vue-Admin
 * @Author:技术铺<jishupu@qq.com>
 * @Date: 2021/11/11
 */

namespace App\Http\Controllers;

use App\Services\ViewLogService;

/**
 * 应用访问量模块
 * Class ViewLogController
 * @package App\Http\Controllers
 */
class ViewLogController extends Controller
{
    /**
     * 获取访问量、操作系统、浏览器统计信息
     * @return \Illuminate\Http\JsonResponse
     */
    public function statistics()
    {
        return $this->success('', [
            'daily' => ViewLogService::dailyStatistics(7),
            'platform' => ViewLogService::platformStatistics(0),
            'browser' => ViewLogService::browserStatistics(0)
        ]);
    }
}
